package com.ys.nms.module.business.dal.mysql.alertRules;

import java.util.*;

import com.ys.nms.framework.common.pojo.PageResult;
import com.ys.nms.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.ys.nms.framework.mybatis.core.mapper.BaseMapperX;
import com.ys.nms.module.business.dal.dataobject.alertRules.AlertRulesDO;
import org.apache.ibatis.annotations.Mapper;
import com.ys.nms.module.business.controller.admin.alertRules.vo.*;

/**
 * 报警规则 Mapper
 *
 * @author zzy
 */
@Mapper
public interface AlertRulesMapper extends BaseMapperX<AlertRulesDO> {

    default PageResult<AlertRulesDO> selectPage(AlertRulesPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<AlertRulesDO>()
                .eqIfPresent(AlertRulesDO::getId, reqVO.getId())
                .orderByDesc(AlertRulesDO::getId));
    }

}